package com.rd.student.jiaji.class3.sunguowei.day27;

import java.io.File;
import java.io.FileWriter;
import java.io.Writer;

public class TestWriter {
    //如果要写数据的文件不存在  会创建一个新的
    public static void main(String[] args) throws Exception{
        File file=new File("streamNew.txt");
        Writer writer=new FileWriter(file);
        String content="hello writer";
        writer.write(content);
        writer.close();
    }

}
